package educrypt.resources;

import java.io.InputStream;
import java.net.URL;

import educrypt.EduCryptMain;

public class EduCryptResources {
	private static final String RESOURCE_FOLDER = "/educrypt/resources";
	private static final String IMAGE_FOLDER = RESOURCE_FOLDER + "/images/";
	private static final String DB_SCRIPT_PATH = RESOURCE_FOLDER
			+ "/db/eduCryptQueries.sql";
	private static final String FONT_PATH = RESOURCE_FOLDER + "/font/DejaVuSans.ttf";

	public static URL getImageURL(String imgName) {
		return EduCryptMain.class.getResource(IMAGE_FOLDER + imgName);
	}

	public static InputStream getFontStream() {
		return EduCryptMain.class.getResourceAsStream(FONT_PATH);
	}

	public static String getDbScriptPath() {
		return EduCryptMain.class.getResource(DB_SCRIPT_PATH).getFile();

	}

	public static InputStream getDbScriptStream() {
		return EduCryptMain.class.getResourceAsStream(DB_SCRIPT_PATH);
	}
}
